<?php
/* Clase del formulario FrmUsers que permite administrar los tipos de inmuebles de SCI
 */
class FrmTypes{
	private $setter;
	private $dbOperator;
	
	private $easyForm;
	private $frmTableTypes;
	
	private $divZonesTypes;
	
		
	function FrmTypes(){
		$this->setter=new Setter("../../Config");
		$this->dbOperator=new DbOperator();
		$this->dbOperator=new DbOperator($this->setter->getDataBaseHost(),$this->setter->getDataBaseUserName(),$this->setter->getDataBaseName(),$this->setter->getDataBasePassword());
		$this->dbOperator->connect();
		$types=$this->dbOperator->consult("SELECT nombre FROM tiposInmueble", "yes");
				
		$this->easyForm=new EasyForm("typesForm", "typesForm","get","../../Events/Admin/EventsFrmTypes.php","Registro de tipos de inmuebles:","","","","");
		$this->easyForm->addInput(1,"Nombre:","nombreTipo","nombreTipo","","","","","form","","",array());
		$this->easyForm->addButton(1,"Aceptar:","AceptarTipo","AceptarTipo","Aceptar","aceptar","aceptar tipo","button","","button","","Aceptar","","","",array("onclick"=>"GETMethodSend('nombreTipo',this.id,'tableTypes','../../Events/Admin/EventsFrmTypes.php')"));
		$this->frmTableTypes=new FrmTableTypes();
		
		$this->divTypesTable=new Div("tableTypes","tableTypes","tableDB");
	}
	function show(){
		$this->easyForm->show(4,4);
		$this->divTypesTable->start();
			$this->frmTableTypes->show();
		$this->divTypesTable->end();
	}
}
?>
